import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const querySysBizMsgConfig = (params) => {
  params.head.transCode = 'querySysBizMsgConfig';
  return request({
    url: '/platform/sysBizMsgConfig/querySysBizMsgConfig',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const querySysBizMsgConfigListPage = (params) => {
  params.head.transCode = 'querySysBizMsgConfigListPage';
  return request({
    url: '/platform/sysBizMsgConfig/querySysBizMsgConfigListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveSysBizMsgConfig = (params) => {
  params.head.transCode = 'saveSysBizMsgConfig';
  return request({
    url: '/platform/sysBizMsgConfig/saveSysBizMsgConfig',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveSysBizMsgConfigList = (params) => {
  params.head.transCode = 'saveSysBizMsgConfigList';
  return request({
    url: '/platform/sysBizMsgConfig/saveSysBizMsgConfigList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateSysBizMsgConfig = (params) => {
  params.head.transCode = 'saveOrUpdateSysBizMsgConfig';
  return request({
    url: '/platform/sysBizMsgConfig/saveOrUpdateSysBizMsgConfig',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateSysBizMsgConfigList = (params) => {
  params.head.transCode = 'saveOrUpdateSysBizMsgConfigList';
  return request({
    url: '/platform/sysBizMsgConfig/saveOrUpdateSysBizMsgConfigList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateSysBizMsgConfig = (params) => {
  params.head.transCode = 'updateSysBizMsgConfig';
  return request({
    url: '/platform/sysBizMsgConfig/updateSysBizMsgConfig',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteSysBizMsgConfig = (params) => {
  params.head.transCode = 'deleteSysBizMsgConfig';
  return request({
    url: '/platform/sysBizMsgConfig/deleteSysBizMsgConfig',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteSysBizMsgConfigList = (params) => {
  params.head.transCode = 'deleteSysBizMsgConfigList';
  return request({
    url: '/platform/sysBizMsgConfig/deleteSysBizMsgConfigList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportSysBizMsgConfigExcel = (params) => {
  downloadExcel({
    url: '/platform/sysBizMsgConfig/excelDownload/exportSysBizMsgConfigExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
